/**
 * 
 */
package com.great.meal.search.domain;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author lenovo
 *
 */
@Entity
@Table(name="t_sender")
public class Sender implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 7868908968236467747L;
	private Long senderId;
	private String senderAccount;
	private String senderPwd;
	private String senderName;
	private String senderPhone;
	private String senderEmail;
	private Integer honour;
	private Boolean status; //true为可用
	
	
	@Override
	public boolean equals(Object obj) {
		if(this == obj) return true;
		if(!(obj instanceof Sender)) return false;
		
		final Sender sender = (Sender)obj;
		if(!(sender.getSenderId().equals(getSenderId()))) return false;
		if(!(sender.getSenderAccount().equals(getSenderAccount()))) return false;
		if(!(sender.getSenderEmail().equals(getSenderEmail())))  return false;
		if(!(sender.getSenderName().equals(getSenderName())))  return false;
		if(!(sender.getSenderPhone().equals(getSenderPhone())))  return false;
		if(!(sender.getHonour().equals(getHonour())))  return false;
		if(!(sender.getStatus().equals(getStatus())))  return false;
		
		return true;
	}
	@Override
	public int hashCode() {
		int result = senderId != null ? senderId.hashCode() : 0;
		result = result * 31 + (senderAccount != null ? senderAccount.hashCode() : 0);
		result = result * 31 + (senderName != null ? senderName.hashCode() : 0);
		result = result * 31 + (senderPhone != null ? senderPhone.hashCode() : 0);
		result = result * 31 + (senderEmail != null ? senderEmail.hashCode() : 0);
		result = result * 31 + (honour != null ? honour.hashCode() : 0);
		result = result * 31 + (status != null ? status.hashCode() : 0);
		
		return super.hashCode();
	}
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public Long getSenderId() {
		return senderId;
	}
	public void setSenderId(Long senderId) {
		this.senderId = senderId;
	}
	public String getSenderAccount() {
		return senderAccount;
	}
	public void setSenderAccount(String senderAccount) {
		this.senderAccount = senderAccount;
	}
	public String getSenderName() {
		return senderName;
	}
	public void setSenderName(String senderName) {
		this.senderName = senderName;
	}
	public String getSenderPhone() {
		return senderPhone;
	}
	public void setSenderPhone(String senderPhone) {
		this.senderPhone = senderPhone;
	}
	public String getSenderEmail() {
		return senderEmail;
	}
	public void setSenderEmail(String senderEmail) {
		this.senderEmail = senderEmail;
	}
	public Integer getHonour() {
		return honour;
	}
	public void setHonour(Integer honour) {
		this.honour = honour;
	}
	public Boolean getStatus() {
		return status;
	}
	public void setStatus(Boolean status) {
		this.status = status;
	}
	
	public String getSenderPwd() {
		return senderPwd;
	}
	public void setSenderPwd(String senderPwd) {
		this.senderPwd = senderPwd;
	}
	
}
